package com.zeedev.flyingsaucer.beers.activities.pref;

import android.os.Bundle;
import android.preference.ListPreference;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import com.zeedev.flyingsaucer.ufoclub.R;
import roboguice.activity.RoboPreferenceActivity;

/**
 * User: James
 * Date: 1/3/11
 * Time: 6:24 PM
 */
public class LoginScreen extends RoboPreferenceActivity {

    //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    // Injection
    //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    // Activity Lifecycle
    //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

//        getWindow().requestFeature(Window.FEATURE_INDETERMINATE_PROGRESS);

//        setContentView(R.layout.login);
//        setContentView(R.layout.login_prefs);
        addPreferencesFromResource(R.xml.login_prefs);

        ListPreference lp = (ListPreference) getPreferenceManager().findPreference("storeList");
        lp.setEntries(new CharSequence[]{"test1","test2" });
        lp.setEntryValues(new CharSequence[]{"1","2" });

    }

    //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    // Global Access
    //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


    //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    // Menus
    //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.login, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            case R.id.menu_login_refresh: {

                return true;
            }
        }
        return false;
    }





}